#pragma once

#include "../umlmodel_global.h"

#include <memory>
#include <vector>

#include "Action.h"

using std::make_shared;
using std::shared_ptr;
using std::vector;

namespace uml {
class InputPin;
class OutputPin;
class Property;

/// <summary>
/// ReadLinkObjectEndQualifierAction
/// A ReadLinkObjectEndQualifierAction is an Action that retrieves a qualifier end
/// value from a link object.
/// </summary>
class UMLMODEL_EXPORT ReadLinkObjectEndQualifierAction : public Action {

public: // Constructors and destructors
    explicit ReadLinkObjectEndQualifierAction(const QString& umlType="uml::ReadLinkObjectEndQualifierAction");

public: // JsonSerializable override
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    void toJson(QJsonObject& json) override;

public: // Properties
    /// <summary>
    /// object getter
    /// The InputPin from which the link object is obtained.
    /// </summary>
    shared_ptr<InputPin> object() const;

    /// <summary>
    /// object setter
    /// The InputPin from which the link object is obtained.
    /// </summary>
    void setObject(shared_ptr<InputPin> value);

    /// <summary>
    /// qualifier getter
    /// The qualifier Property to be read.
    /// </summary>
    shared_ptr<Property> qualifier() const;

    /// <summary>
    /// qualifier setter
    /// The qualifier Property to be read.
    /// </summary>
    void setQualifier(shared_ptr<Property> value);

    /// <summary>
    /// result getter
    /// The OutputPin where the result value is placed.
    /// </summary>
    shared_ptr<OutputPin> result() const;

    /// <summary>
    /// result setter
    /// The OutputPin where the result value is placed.
    /// </summary>
    void setResult(shared_ptr<OutputPin> value);

private: // Fields
    /// <summary>
    /// object
    /// The InputPin from which the link object is obtained.
    /// </summary>
    shared_ptr<InputPin> object_;

    /// <summary>
    /// qualifier
    /// The qualifier Property to be read.
    /// </summary>
    shared_ptr<Property> qualifier_;

    /// <summary>
    /// result
    /// The OutputPin where the result value is placed.
    /// </summary>
    shared_ptr<OutputPin> result_;

};

} // namespace uml
